home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_092 / as6502 / as6502.notes < prev    next >
Text File  |  1992-05-06  |  6KB  |  199 lines

  1.  
  2.  
  3.  
  4.                         aaaaaassssss666666555555000000222222 UUUUUUsssssseeeeeerrrrrr NNNNNNooooootttttteeeeeessssss                  Page 1
  5.  
  6.  
  7. SSSSSSOOOOOOUUUUUURRRRRRCCCCCCEEEEEE LLLLLLIIIIIINNNNNNEEEEEE FFFFFFOOOOOORRRRRRMMMMMMAAAAAATTTTTT:
  8.  
  9.      <label> <operation> <operand> <comment>
  10.  
  11. Each field is terminated by one or more spaces, a tab  or  a  ';'
  12. (which begins the comment field immediately).
  13.  
  14. LLLLLLAAAAAABBBBBBEEEEEELLLLLL FFFFFFIIIIIIEEEEEELLLLLLDDDDDD:
  15.  
  16. If first character is ';', entire line is a  comment.   If  first
  17. character is space, label field is null.  Labels are alphanumeric
  18. strings beginning with 'a' through 'z', 'A' through  'Z',  under-
  19. score  or  period  followed by any of the above characters or '0'
  20. through '9'.  Currently, labels are limited to 19 characters.  A,
  21. X, Y, a, x and y are reserved labels.
  22.  
  23. OOOOOOPPPPPPEEEEEERRRRRRAAAAAATTTTTTIIIIIIOOOOOONNNNNN FFFFFFIIIIIIEEEEEELLLLLLDDDDDD:
  24.  
  25. Upper and lower case letters are equivalent.   Machine  operation
  26. mnemonics are:
  27.  
  28.      ADC     BMI     CLD     DEX     JSR     PHA     RTS     STY
  29.      AND     BNE     CLI     DEY     LDA     PHP     SBC     TAX
  30.      ASL     BPL     CLV     EOR     LDX     PLA     SEC     TAY
  31.      BCC     BRK     CMP     INC     LDY     PLP     SED     TSX
  32.      BCS     BVC     CPX     INX     LSR     ROL     SEI     TXA
  33.      BEQ     BVS     CPY     INY     NOP     ROR     STA     TXS
  34.      BIT     CLC     DEC     JMP     ORA     RTI     STX     TYA
  35.  
  36. Pseudo operation mnemonics are:
  37.  
  38.      =      equate label name to operand field  value  (space  is
  39.             not needed to terminate this operation).
  40.      *=     set location counter to operand field value (space is
  41.             not needed to terminate this operation).
  42.      .WORD  assign 16 bit value of operand field to next two  lo-
  43.             cations; low byte of value first, then high byte.
  44.      .DBYT  assign 16 bit value of operand field to next two  lo-
  45.             cations; high byte of value first, then low byte.
  46.      .BYTE  assign 8 bit value of operand field to next location.
  47.      .NLST  turn listing mode off (this source line is not  list-
  48.             ed).
  49.      .LIST  turn listing mode on (normal mode) (this source  line
  50.             is not listed).
  51.      .PAGE  start a new listing page.  Optionally specify a title
  52.             for the page heading.  (this source line is not list-
  53.             ed).
  54.  
  55. OOOOOOPPPPPPEEEEEERRRRRRAAAAAANNNNNNDDDDDD FFFFFFIIIIIIEEEEEELLLLLLDDDDDD:
  56.  
  57. Operand field expressions use infix notation  and  are  evaluated
  58. strictly from left to right.  No imbedded spaces are permitted.
  59.  
  60. Operand field terms include labels and numbers.  Asterisk (*)  is
  61. the  label  for  the location counter value.  Numbers are binary,
  62. octal, decimal, hexadecimal or ASCII.  Number type  is  indicated
  63. by the first character of the number string as follows:
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                         aaaaaassssss666666555555000000222222 UUUUUUsssssseeeeeerrrrrr NNNNNNooooootttttteeeeeessssss                  Page 2
  71.  
  72.  
  73.  
  74.      %       binary prefix
  75.      @ or 0  octal prefix
  76.      1 - 9   decimal by default (prefix is part of number)
  77.      $       hexadecimal prefix
  78.      '       ASCII character prefix
  79.      "       ASCII character string prefix and suffix; in the
  80.              string, \t is a tab character, \n is a new line.
  81.  
  82. Operand field operations and the corresponding symbols are:
  83.  
  84.      +       addition
  85.      -       subtraction
  86.      /       division
  87.      *       multiplication
  88.      %       modulo (remainder after integer division)
  89.      ^       logical exclusive OR
  90.      &       logical AND
  91.      |       logical OR
  92.      <       low byte
  93.      >       high byte
  94.  
  95. Addressing modes are represented as follows:
  96.       lda =aa         immediate addressing
  97.       lda #aa         immediate addressing, alternate
  98.       lda D           direct addessing
  99.       LDA aa          page zero addressing, aa < 256
  100.       asl A           accumulator addressing
  101.       brk             implied addressing
  102.       lda (aa,X)      indirect,X addressing
  103.       lda (aa),Y      indirect,Y addressing
  104.       lda aa,X        zero page,X addressing
  105.       lda D,X         absolute,X addressing
  106.       lda D,Y         absolute,Y addressing
  107.       bcc *-$10       relative addressing
  108.       jmp (D)         indirect addressing
  109.       ldx aa,Y        zero page,Y addressing
  110.  
  111.      EEEEEERRRRRRRRRRRROOOOOORRRRRR MMMMMMEEEEEESSSSSSSSSSSSAAAAAAGGGGGGEEEEEESSSSSS:
  112.  
  113.      Invalid operation code
  114.      Invalid argument count (when as6502 was invoked)
  115.      Open error for file
  116.      Creat error for object file 6502.out
  117.      Close error
  118.      Close error (6502.out)
  119.      Symbol table full
  120.      Label multiply defined
  121.      Sync error (pass 1 symbol value not equal pass 2 symbol value)
  122.      Invalid branch address
  123.      Operand field missing
  124.      Invalid addressing mode
  125.      Operand field size error
  126.      Undefined symbol in operand field
  127.      Invalid operand field
  128.  
  129. IIIIIINNNNNNVVVVVVOOOOOOKKKKKKIIIIIINNNNNNGGGGGG aaaaaassssss666666555555000000222222:
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                         aaaaaassssss666666555555000000222222 UUUUUUsssssseeeeeerrrrrr NNNNNNooooootttttteeeeeessssss                  Page 3
  137.  
  138.  
  139.      as6502 {-ilnmos} {-p -t -w } <source files descriptions>
  140.  
  141. Options:
  142.  
  143.      -i   ignore any .nlst pseudo operations
  144.      -l   list errors only
  145.      -n   print addresses as <high byte><low byte>,
  146.           rather than as <low byte>:<high byte>.
  147.      -o   generate ASCII object output in file 6502.out,
  148.           format is
  149.                ;<address lo><address hi><data>
  150.      -s   print symbol table at end of listing
  151.      -m   output the object file in standard MOS Technology format.
  152.  
  153.  
  154.      Parameters:
  155.      -p   specify the page length.
  156.      -t   specify the symbol table size.
  157.      -w   specify the print line size.
  158.  
  159.                      J. H. Van Ornum, JHS  3/3/87
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.